package proxying_mechanisms;

import org.springframework.aop.framework.AopContext;

public class SimplePojo implements Pojo {
    public void foo() {
        System.out.println("SimplePojo: foo()");
        // this next method invocation is a direct call on the 'this' reference
        this.bar();
        ((Pojo) AopContext.currentProxy()).bar();
    }

    public void bar() {
        System.out.println("  SimplePojo: bar()");
        // some logic...
    }
}
